<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<table class="table table-hover">
			<tr class="active">
				<td width="80">货品id</td>

				<td width="">颜色</td>
				<td width="">尺码</td>

				<td width="40">库存</td>
				<td width="">货号</td>
				<td width="150">操作</td>
			</tr>
			{{foreach from="$listData" key="$k" value="$v"}}
			<tr>
				<!--id-->
				<td>{{$v['glid']}}</td>
				<!--颜色 和尺码-->
				
				<td>{{$v['combine'][0]}}</td>
				<td>{{$v['combine'][1]}}</td>
				<!--库存-->
				<td>{{$v['inventory']}}</td>
				<!--货号-->
				<td>{{$v['number']}}</td>
				<td>
					<a href="{{U('edit',array('glid'=>$v['glid']))}}" class="btn btn-sm btn-warning">编辑</a>
					<a href="{{U('del',array('glid'=>$v['glid']))}}" class="btn btn-sm btn-danger">删除</a>
				</td>
			</tr>
			{{endforeach}}
			<!--添加货品-->
			<tr>
				<form action="" method="post">
					
					
				
				<td width="50">添加货品</td>
				
				<td width="40">
					<select name="combine[]">
						
						{{foreach from="$goodsAttr" key="$k" value="$v"}}
						{{if value="$goodsAttr[$k]['taname']=='颜色'"}}
						{{foreach from="$v['tavalue']" key="$kk" value="$vv"}}
						
						<option value="{{$goodsAttr[$k]['gtid']}}">{{$vv}}</option>
						
						{{endforeach}}
						{{endif}}
						
						{{endforeach}}

					</select>
				</td>
					<td width="40">
					<select name="combine[]">
						
						{{foreach from="$goodsAttr" key="$k" value="$v"}}
						{{if value="$goodsAttr[$k]['taname']=='尺寸'"}}
						{{foreach from="$v['tavalue']" key="$kk" value="$vv"}}
						
						<option value="{{$goodsAttr[$k]['gtid']}}">{{$vv}}</option>
						
						{{endforeach}}
						{{endif}}
						
						{{endforeach}}

					</select>
				</td>
				<!--库存-->
				<td width="">
					<input type="text" name="inventory" id="" value="" />
				</td>
				<!--货号-->
				<td width="40">
					<input type="text" name="number" id="" value="" />
				</td>
				<td>
					<input type="hidden" name="gid" id="gid" value="{{$goodsAttr[$k]['gid']}}" />
					<input type="submit" class="btn btn-sm btn-warning" value="提交"/>
				</td>
				</form>
			</tr>
			
		</table>
	</body>
</html>
